package org.mymybatis.mapping;


import lombok.Data;

import java.sql.PreparedStatement;

/**
 * 每个标签的对应的对象
 */
@Data
public final class MappedStatement {


    private String sqlId;
    private String sql;
    private String parameterType;

    private String sqlType;
    /**
     * 要封装的结果集类型  有时是null 例如insert  update
     */
    private String resultType;

    public MappedStatement() {
    }

    public MappedStatement(String sqlId, String sql, String parameterType, String sqlType, String resultType) {
        this.sqlId = sqlId;
        this.sql = sql;
        this.parameterType = parameterType;
        this.sqlType = sqlType;
        this.resultType = resultType;
    }

    @Override
    public String toString() {
        return "MappedStatement{" +
                "sql='" + sql + '\'' +
                ", resultType='" + resultType + '\'' +
                '}';
    }

    public String getSqlId() {
        return sqlId;
    }

    public void setSqlId(String sqlId) {
        this.sqlId = sqlId;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public String getParameterType() {
        return parameterType;
    }

    public void setParameterType(String parameterType) {
        this.parameterType = parameterType;
    }

    public String getSqlType() {
        return sqlType;
    }

    public void setSqlType(String sqlType) {
        this.sqlType = sqlType;
    }

    public String getResultType() {
        return resultType;
    }

    public void setResultType(String resultType) {
        this.resultType = resultType;
    }
}
